.home-container {
  min-height: 100vh;
  background: linear-gradient(180deg, #e3f2fd 0%, #f0f7ff 40%, #ffffff 100%);
  background-attachment: fixed;
}

.header {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 0;
}

.logo img {
  width: 60px;
  height: auto;
  border-radius: 8px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: #f0f0f0;
  border-radius: 20px;
  padding: 8px 15px;
  flex: 1;
  max-width: 600px;
  margin: 0 20px;
  position: relative;
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  padding: 0 8px;
}

.search-bar button {
  background: none;
  border: none;
  cursor: pointer;
  color: #007bff;
  font-size: 14px;
  font-weight: bold;
}

.header-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

.btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.btn:hover {
  background: #f5f5f5;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: #ddd;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #999;
  font-size: 20px;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-dropdown {
  position: absolute;
  top: 60px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 145px;
  z-index: 1000;
  padding: 10px 0;
  font-size: 14px;
}

.username:hover {
  background-color: #f0f0f08a;
}

.username {
  cursor: pointer;
  font-size: 16px;
  color: #333;
  font-weight: 500;
  font-weight: bolder;
  padding: 20px;
}

.dropdown-item {
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.2s;
  color: #333;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

.filter-panel {
  margin: 30px auto;
  width: 60%;
  background: white;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-row {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
  align-items: center;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
}

.filter-label {
  font-size: 14px;
  color: #333;
  min-width: 50px;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.slider {
  position: relative;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  cursor: pointer;
  flex: 1;
}

.slider-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 2px;
  background: #ddd;
  z-index: 1;
}

.slider-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #007bff;
  border-radius: 2px;
  z-index: 2;
  width: 50%;
}

.slider-thumb {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: #007bff;
  border-radius: 50%;
  z-index: 3;
  cursor: grab;
}

.slider-thumb:active {
  cursor: grabbing;
}

.value-controls {
  display: flex;
  gap: 5px;
}

.value-btn {
  width: 24px;
  height: 24px;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  background: white;
}

.value-input {
  width: 40px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 2px;
  font-size: 14px;
}

.product-list {
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-loading,
.product-error,
.product-empty {
  text-align: center;
  padding: 40px 0;
  font-size: 16px;
  color: #555;
  background: white;
  border: 1px solid #eee;
  border-radius: 8px;
}

.product-error {
  color: #d93025;
}

.product-card {
  background: white;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  gap: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.product-image {
  width: 150px;
  height: 150px;
  background: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.product-price {
  font-size: 18px;
  color: #ff5500;
  font-weight: bold;
  margin-bottom: 8px;
}

.product-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.product-purchase {
  font-size: 14px;
  color: #999;
}

.relevance-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #666;
}

.relevance-label {
  white-space: nowrap;
}

.relevance-bar {
  flex: 1;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}

.relevance-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcf7f);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.relevance-score {
  font-weight: bold;
  color: #333;
  min-width: 35px;
  text-align: right;
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-btn {
  padding: 10px 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  transition: background 0.2s;
}

.action-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

.action-btn:hover {
  background: #f5f5f5;
}

.action-btn.primary {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.action-btn.primary:hover {
  background: #0056b3;
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 15px;
  }

  .search-bar {
    max-width: 100%;
  }

  .product-card {
    flex-direction: column;
  }

  .product-image {
    width: 100%;
    height: 150px;
  }

  .filter-row {
    flex-direction: column;
    gap: 10px;
  }
}

.search-history-dropdown {
  position: absolute;
  top: 100%;
  left: 18px;
  right: 18px;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 999;
  max-height: 200px;
  overflow-y: auto;
}

.search-history-item {
  padding: 10px 15px;
  cursor: pointer;
  color: #333;
  font-size: 14px;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.2s;
}

.search-history-item:hover {
  background: #f0f7ff;
}

.search-history-item:last-child {
  border-bottom: none;
}

.clear-history {
  color: #000;
  text-align: center;
  border-top: 1px solid #eee;
  margin-top: 8px;
}

.no-record {
  padding: 10px;
  text-align: center;
  color: #999;
}
